package cn.kgc.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.time.ZonedDateTime;

/**
 * @author: mosin
 * @version: v1.0  2023/1/3
 */
@Controller
@RequestMapping("score")
public class ScoreController {

    @Value("${server.port}")
    private String port;

    @RequestMapping("m1")
    @ResponseBody
    public String method1(HttpServletRequest request){
        String color = request.getParameter("color");
        return " method1 ScoreService ok port=" +port+"color:"+color;
    }


    @RequestMapping("m2")
    @ResponseBody
    public String method2(HttpServletRequest request){
        String color = request.getParameter("color");
        return " method2 ScoreService ok port=" +port+"color:"+color;
    }

}
